﻿<phone:PhoneApplicationPage 
    x:Class="OnlineVideos.QuestionsDisplay"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" shell:SystemTray.IsVisible="False" Loaded="PhoneApplicationPage_Loaded" BackKeyPress="PhoneApplicationPage_BackKeyPress" d:DesignHeight="800" d:DesignWidth="480">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="{StaticResource bipivot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>

        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Row="0">
            <Image Style="{StaticResource DetailPagePivotTitleImage}" x:Name="imgTitle" MouseLeftButtonDown="imgTitle_MouseLeftButtonDown" />
            <TextBlock x:Name="tblkVideosTitle" Style="{StaticResource DetailPagePivotTitle}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="Questionsgrid" Grid.Row="1" Margin="0,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="48"></RowDefinition>
                <RowDefinition Height="540"></RowDefinition>
                <RowDefinition Height="85"></RowDefinition>
                <RowDefinition Height="80"></RowDefinition>
            </Grid.RowDefinitions>
            <ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1" >
                <StackPanel  x:Name="spQuestions" Grid.Row="0">
                    <StackPanel Orientation="Vertical" x:Name="stkoptionslist">
                        <StackPanel Orientation="Vertical" >
                            <StackPanel Orientation="Horizontal" Width="440" Margin="15,0,0,0">
                                <TextBlock TextWrapping="Wrap"  Text="{Binding QuestionID}" FontSize="36" FontWeight="Bold" Foreground="White"></TextBlock>
                                <TextBlock   Text="." FontSize="35" Foreground="White"></TextBlock>
                                <TextBlock TextWrapping="Wrap" Width="390"  Text="{Binding Question}" Foreground="White" FontSize="26" Margin="5,10,10,10"></TextBlock>
                            </StackPanel>
                            <Image x:Name="imgquest" Source="{Binding ImgQuestion}" Visibility="{Binding ImgQuestion, TargetNullValue=Collapsed}" Height="200" Width="200"></Image>
                        </StackPanel>

                        <StackPanel Visibility="{Binding QuestionType, TargetNullValue=Visible}" Orientation="Vertical" Margin="8,0,0,0">
                            <RadioButton Name="rbA" Style="{StaticResource QuizRadioButtonStyle}" >
                                <RadioButton.Content>
                                    <TextBlock Text="{Binding Option1}" Foreground="White" TextWrapping="Wrap"   FontSize="22" Width="350"></TextBlock>
                                </RadioButton.Content>
                            </RadioButton>
                            <RadioButton  Name="rbB" Style="{StaticResource QuizRadioButtonStyle}">
                                <RadioButton.Content>
                                    <TextBlock TextWrapping="Wrap" Foreground="White" Text="{Binding Option2}" FontSize="22" Width="350"></TextBlock>
                                </RadioButton.Content>
                            </RadioButton>
                            <RadioButton  Name="rbC"  Visibility="{Binding Option3, TargetNullValue=Collapsed}" Style="{StaticResource QuizRadioButtonStyle}">
                                <RadioButton.Content>
                                    <TextBlock TextWrapping="Wrap" Foreground="White" Text="{Binding Option3}" FontSize="22" Width="350"></TextBlock>
                                </RadioButton.Content>
                            </RadioButton>
                            <RadioButton  Name="rbD"  Visibility="{Binding Option4, TargetNullValue=Collapsed}" Style="{StaticResource QuizRadioButtonStyle}">
                                <RadioButton.Content>
                                    <TextBlock TextWrapping="Wrap" Foreground="White" Text="{Binding Option4}" FontSize="22" Width="350"></TextBlock>
                                </RadioButton.Content>
                            </RadioButton>
                        </StackPanel>
                        <StackPanel Orientation="Vertical" Margin="20,0,0,0" Visibility="{Binding QuestionType, TargetNullValue=Collapsed}">
                            <CheckBox Content="{Binding Option1}" Name="cbA"  Style="{StaticResource QuizCheckBoxStyle}" Visibility="Collapsed"/>
                            <CheckBox Content="{Binding Option2}"  Name="cbB"  Style="{StaticResource QuizCheckBoxStyle}" Visibility="Collapsed"/>
                            <CheckBox Content="{Binding Option3}" Name="cbC" Visibility="Collapsed" Style="{StaticResource QuizCheckBoxStyle}"/>
                            <CheckBox Content="{Binding Option4}"  Name="cbD"  Visibility="Collapsed" Style="{StaticResource QuizCheckBoxStyle}"/>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </ScrollViewer>

            <Canvas>
                <TextBlock  Canvas.Top="515" Canvas.Left="40"  x:Name="txtmsg" Text="Please select an answer" FontSize="30"  Foreground="Red" Margin="10,0,0,10" Visibility="Collapsed"/>
            </Canvas>
            
            <StackPanel Orientation="Horizontal" Grid.Row="2" Width="460">
                <Image Source="/Images/Previous.png"  HorizontalAlignment="Left" Visibility="Collapsed" Margin="10,0,0,0" x:Name="imgprevious" Height="70" Width="130" MouseLeftButtonDown="imgprevious_MouseLeftButtonDown"></Image>
                <TextBlock x:Name="tblktimer"  Margin="40,25,0,0" Text="" FontSize="24" HorizontalAlignment="Center" Foreground="White" Width="140" FontWeight="Bold"/>
                <Image Source="/Images/Next.png"   Margin="100,0,0,0" HorizontalAlignment="Right" x:Name="imgnext" Height="70" Width="130" MouseLeftButtonDown="imgnext_MouseLeftButtonDown"></Image>
            </StackPanel>
            
            <StackPanel Name="adstackpl" Grid.Row="3" Orientation="Vertical">
            </StackPanel>
        </Grid>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbtnprevious" IconUri="/Images/appbar.sync.rest.png" Text="Previous" Click="ApplicationBarIconButton_Click"   />
            <shell:ApplicationBarIconButton x:Name="appbtnnext" IconUri="/Images/appbar.transport.play.rest.png" Text="Next" Click="ApplicationBarIconButton_Click_1"/>
            
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>